import type { ProfileDetail, ProfileParams } from '@/types/member'
import { http } from '@/utils/http'

/**
 * 获取个人信息
 */
export const getMemberProfileAPI = (userId) => {
  return http<ProfileDetail>({
    method: 'GET',
    url: `/user/user/UserInfo/${userId}`,
    data:userId
  })
}
/**
 * 修改个人信息
 * @param data 请求体参数
 */
export const putMemberProfileAPI = (data: ProfileParams) => {
  return http({
    method: 'PUT',
    url: '/user/user/userInfo',
    data,
  })
}
// 用户更改设备使用者
export const putMemberUserAPI = (data) =>{
  return http({
    method: 'POST',
    url: '/user/user/updateDeviceUse',
    data
  })
}
